﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="ApplicationDetailBJXX.aspx.cs" Inherits="WXYW.ApplicationDetailBJXX" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    <asp:Label ID="userLabel" runat="server" Text=""></asp:Label>的申请单
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ButtonPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
    <div align="right" style="width: 100%; margin-bottom: 10px; margin-right: 20px">
        <% if (WXYW.ContextService.CurrentAccount.UserType.ID == (int)(WXYW.BLL.RoleType.Customer) &&
               application.Status.Equals("已发货待客户确认") || application.Status.Equals("备件已归还"))
           {%>
        <img src="image/check.gif" />
        <asp:HyperLink ID="receiveHyperLink" runat="server">收货确认</asp:HyperLink>
        <%} %>
        <img src="image/operateicon/docview.gif" alt="" />
        <asp:HyperLink ID="viewHyperLink" runat="server">查看原始记录</asp:HyperLink>
        <%--<asp:HyperLink ID="modifyHyperLink" runat="server">修改</asp:HyperLink>
        <img src="image/operateicon/print.gif" alt="" />--%>
        <a onclick="preview()" href="#">打印</a>
        <img src="image/operateicon/back_back.gif" alt="" />
        <asp:HyperLink ID="returnHyperLink" runat="server">返回</asp:HyperLink>
    </div>
    <!--startprint-->
    <table width="100%" border="0px" cellpadding="0px" cellspacing="0px">
        <tr style="height: 20px">
            <td style="width: 10%">
                <b>流水号:</b>
            </td>
            <td style="width: 20%">
                <asp:Label ID="runningNumberLabel" runat="server"></asp:Label>
            </td>
            <td style="width: 5%">
            </td>
            <td style="width: 10%">
                <b>RMA#:</b>
            </td>
            <td style="width: 20%">
                <asp:Label ID="RMACodeLabel" runat="server"></asp:Label>
            </td>
            <td style="width: 5%">
            </td>
            <td style="width: 10%">
                <%--      <b>当前状态:</b>--%>
            </td>
            <td style="width: 20%">
                <asp:Label ID="statusLabel" runat="server" Visible="false"></asp:Label>
            </td>
        </tr>
    </table>
    <table border="0px" cellpadding="0px" cellspacing="0px" width="100%">
        <tr style="height: 23px;">
            <td colspan="6" style="border-bottom-style: solid; border-bottom-width: 1px;">
                <b>用户信息</b>
            </td>
        </tr>
        <tr style="height: 23px">
            <td style="width: 10%">
                申请人：
            </td>
            <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: Gray;
                width: 30%;">
                <asp:Label ID="contactLabel" runat="server" Width="100%"></asp:Label>
            </td>
            <td style="width: 5%">
            </td>
            <td style="width: 10%">
                公司名称：
            </td>
            <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: Gray;
                width: 40%;">
                <asp:Label ID="companyLabel" runat="server" Width="100%"></asp:Label>
            </td>
            <td style="width: 5%">
            </td>
        </tr>
        <tr style="height: 23px">
            <td>
                电话：
            </td>
            <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: Gray;">
                <asp:Label ID="phoneNumberLabel" runat="server" Width="100%"></asp:Label>
            </td>
            <td>
            </td>
            <td>
                手机号码：
            </td>
            <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: Gray;">
                <asp:Label ID="cellPhoneLabel" runat="server" Width="100%"></asp:Label>
            </td>
            <td>
            </td>
        </tr>
        <tr style="height: 23px">
            <td>
                传真：
            </td>
            <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: Gray;">
                <asp:Label ID="faxLabel" runat="server" Width="100%"></asp:Label>
            </td>
            <td>
            </td>
            <td>
                通迅地址：
            </td>
            <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: Gray;">
                <asp:Label ID="addressLabel" runat="server" Width="100%"></asp:Label>
            </td>
            <td>
            </td>
        </tr>
        <tr style="height: 23px">
            <td>
                电子邮件：
            </td>
            <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: Gray;">
                <asp:Label ID="emailLabel" runat="server" Width="100%"></asp:Label>
            </td>
            <td>
            </td>
            <td>
                代理商/销售员：
            </td>
            <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: Gray;">
                <asp:Label ID="agentLabel" runat="server" Text="" Width="100%"></asp:Label>
            </td>
            <td>
            </td>
        </tr>
        <tr style="height: 23px">
            <td>
                申请日期：
            </td>
            <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: Gray;">
                <asp:Label ID="applyTimeLabel" runat="server" Width="100%"></asp:Label>
            </td>
            <td>
            </td>
            <%--<td>
                处理日期：
            </td>
            <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: Gray;">
                <asp:Label ID="dealWithDateLabel" runat="server" Width="100%"></asp:Label>
            </td>
            <td>
            </td>--%>
        </tr>
        <%--  <tr style="height: 23px">
            <td>
                发货日期：
            </td>
            <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: Gray;">
                <asp:Label ID="sendTimeLabel" runat="server" Width="100%"></asp:Label>
            </td>
            <td>
            </td>
            <td>
                客户收货日期：
            </td>
            <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: Gray;">
                <asp:Label ID="receiveTimeLabel" runat="server" Width="100%"></asp:Label>
            </td>
            <td>
            </td>
        </tr>--%>
        <tr style="height: 23px">
            <td>
                收货信息
            </td>
            <td style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: Gray;"
                colspan="4">
                <asp:Label ID="shxxLbl" runat="server"></asp:Label>
            </td>
            <td>
            </td>
        </tr>
        <tr style="height: 10px">
            <td colspan="6">
            </td>
        </tr>
        <tr style="height: 23px;">
            <td colspan="6" style="border-bottom-style: solid; border-bottom-width: 1px;">
                <b>产品信息</b>
            </td>
        </tr>
        <tr style="height: 10px">
            <td colspan="6">
            </td>
        </tr>
    </table>
    <%--    <asp:GridView ID="productGridView" runat="server" Width="100%" AutoGenerateColumns="False"
        CssClass="tableList" OnRowDataBound="productGridView_RowDataBound">
        <Columns>
            <asp:TemplateField HeaderImageUrl="~/image/operateicon/button_Select.gif">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="IDLbl" runat="server"></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="3%" />
                <ItemStyle Wrap="False" Width="3%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="产品型号">
                <ItemTemplate>
                    <%#Eval("ProductType.ProductTypeName")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="8%" />
                <ItemStyle Wrap="False" Width="8%" />
            </asp:TemplateField>
            <asp:BoundField HeaderText="序列号" DataField="ProductSerialNumber">
                <HeaderStyle Wrap="False" Width="8%" />
                <ItemStyle Wrap="False" Width="8%" />
            </asp:BoundField>
            <asp:BoundField DataField="ProductVersionNumber" HeaderText="版本号">
                <HeaderStyle Wrap="False" Width="5%" />
                <ItemStyle Wrap="False" Width="5%" />
            </asp:BoundField>
            <asp:BoundField HeaderText="数量" DataField="ProductCount">
                <HeaderStyle Wrap="False" Width="4%" />
                <ItemStyle Wrap="False" Width="4%" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="故障现象描述">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("ProductProblemDescription") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="Label1" runat="server" Text='<%# Bind("ProductProblemDescription") %>'
                        TextMode="MultiLine" ReadOnly="true" Columns="15" Rows="1" CssClass="NoneBorderTxtBox"></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle Width="8%" Wrap="False" />
                <ItemStyle Wrap="true" Width="8%" />
            </asp:TemplateField>
            <asp:BoundField HeaderText="外观及附件" DataField="ProductAppearance">
                <HeaderStyle Wrap="False" Width="7%" />
                <ItemStyle Wrap="False" Width="7%" />
            </asp:BoundField>
            <asp:BoundField HeaderText="保修性质" DataField="ProductRepairType">
                <HeaderStyle Wrap="False" Width="4%" />
                <ItemStyle Wrap="False" Width="4%" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="购买日期">
                <ItemTemplate>
                    <%#(Convert.ToDateTime(Eval("ProductPurchaseDateTime"))).ToString("yyyy-MM-dd")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="6%" />
                <ItemStyle Wrap="False" Width="6%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="需求说明">
                <ItemTemplate>
                    <%# Eval("BJSQNeedComment")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="4%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="申请类型">
                <ItemTemplate>
                    <asp:Label ID="applyTypeLbl" runat="server" Text=""></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="6%" />
                <ItemStyle Wrap="False" Width="6%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="购买延保">
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" Enabled="false" Checked='<%#Eval("BJSQYBService")%>' />
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Center" Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="备件型号">
                <ItemTemplate>
                    <%# Eval("ReturnProductType")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="6%" />
                <ItemStyle Wrap="False" Width="6%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="备件序列号">
                <ItemTemplate>
                    <%# Eval("ReturnSerialNumber")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="6%" />
                <ItemStyle Wrap="False" Width="6%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="审批结果">
                <ItemTemplate>
                    <asp:Label ID="aprroveResultLbl" runat="server" Text="Label"></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="6%" />
                <ItemStyle Wrap="False" Width="6%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="处理意见">
                <ItemTemplate>
                    <%# Eval("BJXXApproveComment")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="6%" />
                <ItemStyle Wrap="False" Width="6%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="处理时间">
                <ItemTemplate>
                    <%#(Convert.ToDateTime(Eval("DealWithDateTime"))).ToString("yyyy-MM-dd")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="6%" />
                <ItemStyle Wrap="False" Width="6%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="发货时间">
                <ItemTemplate>
                    <%#(Convert.ToDateTime(Eval("BJXXSendToClient"))).ToString("yyyy-MM-dd")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="6%" />
                <ItemStyle Wrap="False" Width="6%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="收货时间">
                <ItemTemplate>
                    <%#(Convert.ToDateTime(Eval("BJXXClientReceive"))).ToString("yyyy-MM-dd")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="6%" />
                <ItemStyle Wrap="False" Width="6%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="返还时间">
                <ItemTemplate>
                    <%#(Convert.ToDateTime(Eval("BJXXReturnBack"))).ToString("yyyy-MM-dd")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" Width="6%" />
                <ItemStyle Wrap="False" Width="6%" />
            </asp:TemplateField>
            <asp:BoundField HeaderText="状态" DataField="Status">
                <HeaderStyle Wrap="False" Width="4%" />
                <ItemStyle Wrap="False" Width="4%" />
            </asp:BoundField>
        </Columns>
    </asp:GridView>--%>
    <asp:Repeater ID="productRepeater" runat="server" OnItemDataBound="productRepeater_ItemDataBound">
        <HeaderTemplate>
            <table class="tableList" width="100%">
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <th nowrap="nowrap">
                    <img src="image/operateicon/button_Select.gif" alt="" />
                </th>
                <th nowrap="nowrap">
                    产品型号
                </th>
                <th nowrap="nowrap">
                    序列号
                </th>
                <th nowrap="nowrap">
                    版本号
                </th>
                <th nowrap="nowrap">
                    数量
                </th>
                <th nowrap="nowrap">
                    故障现象描述
                </th>
                <th nowrap="nowrap">
                    外观及附件
                </th>
                <th nowrap="nowrap">
                    保修性质
                </th>
                <th nowrap="nowrap">
                    购买日期
                </th>
                <th nowrap="nowrap">
                    申请类型
                </th>
                <th nowrap="nowrap">
                    购买延保
                </th>
            </tr>
            <tr>
                <td rowspan="3">
                    <asp:Label ID="IDLbl" runat="server"></asp:Label>
                </td>
                <td>
                    <%#Eval("ProductType.ProductTypeName")%>
                </td>
                <td>
                    <%#Eval("ProductSerialNumber")%>
                </td>
                <td>
                    <%#Eval("ProductVersionNumber")%>
                </td>
                <td>
                    <%#Eval("ProductCount")%>
                </td>
                <td align="left">
                    <%#Eval("ProductProblemDescription")%>
              <%--      <asp:TextBox ID="Label1" runat="server" Text='<%# Bind("ProductProblemDescription") %>'
                        TextMode="MultiLine" ReadOnly="true" Columns="40" Rows="1" CssClass="NoneBorderTxtBox"></asp:TextBox>--%>
                </td>
                <td>
                    <%#Eval("ProductAppearance")%>
                </td>
                <td>
                    <%#Eval("ProductRepairType")%>
                </td>
                <td>
                    <%#(Convert.ToDateTime(Eval("ProductPurchaseDateTime"))).ToString("yyyy-MM-dd")%>
                </td>
                <td>
                    <asp:Label ID="applyTypeLbl" runat="server" Text=""></asp:Label>
                </td>
                <td>
                    <asp:CheckBox ID="CheckBox1" runat="server" Enabled="false" Checked='<%#Eval("BJSQYBService")%>' />
                </td>
            </tr>
            <tr>
                <th nowrap="nowrap">
                    备件型号
                </th>
                <th nowrap="nowrap">
                    备件序列号
                </th>
                <th nowrap="nowrap">
                    审批结果
                </th>
                <th nowrap="nowrap">
                    处理时间
                </th>
                <th nowrap="nowrap">
                    处理意见
                </th>                
                <th nowrap="nowrap">
                    发货时间
                </th>
                <th nowrap="nowrap">
                    收货时间
                </th>
                <th nowrap="nowrap">
                    返还时间
                </th>
                <th colspan="2" nowrap="nowrap">
                    状态
                </th>
            </tr>
            <tr>
                <td>
                    <%# Eval("ReturnProductType")%>
                </td>
                <td>
                    <%# Eval("ReturnSerialNumber")%>
                </td>
                <td>
                    <asp:Label ID="aprroveResultLbl" runat="server" Text=""></asp:Label>
                </td>               
                <td>
                    <%-- <%#(Convert.ToDateTime(Eval("DealWithDateTime"))).ToString("yyyy-MM-dd")%>--%>
                    <%# (Eval("DealWithDateTime") == null) ? "待处理" : (Convert.ToDateTime(Eval("DealWithDateTime"))).ToString("yyyy-MM-dd HH:mm")%>
                </td>
                 <td align="left">
                    <%# (Eval("BJXXApproveComment") == null) ? "无" : Eval("BJXXApproveComment")%>
                </td>
                <td>
                    <%-- <%#(Convert.ToDateTime(Eval("BJXXSendToClient"))).ToString("yyyy-MM-dd")%>--%>
                    <%# (Eval("BJXXSendToClient") == null) ? "待发货" : (Convert.ToDateTime(Eval("BJXXSendToClient"))).ToString("yyyy-MM-dd HH:mm")%>
                </td>
                <td>
                    <%--<%#(Convert.ToDateTime(Eval("BJXXClientReceive"))).ToString("yyyy-MM-dd")%>--%>
                    <%# (Eval("BJXXClientReceive") == null) ? "待收货": (Convert.ToDateTime(Eval("BJXXClientReceive"))).ToString("yyyy-MM-dd HH:mm")%>
                </td>
                <td>
                    <%-- <%#(Convert.ToDateTime(Eval("BJXXReturnBack"))).ToString("yyyy-MM-dd")%>--%>
                    <%# (Eval("BJXXReturnBack") == null) ? "待返还" : (Convert.ToDateTime(Eval("BJXXReturnBack"))).ToString("yyyy-MM-dd HH:mm")%>
                </td>
                <td colspan="2">
                    <%# Eval("Status")%>
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    <asp:PlaceHolder ID="serviceStationPlaceHolder" runat="server" Visible="false">
        <p style="border-bottom-style: solid; border-bottom-width: 1px; border-color: Black;">
            <b>维修站信息</b>(此维修申请由下面的维修站受理)
        </p>
        <table border="1" style="border-collapse: collapse; border-color: Black;" width="100%">
            <tr style="width: 100%;">
                <td style="width: 8%; height: 25px">
                    维修站：
                </td>
                <td style="width: 15%;">
                    <asp:Label ID="stationNameLabel" runat="server" Text=""></asp:Label>
                </td>
                <%-- <td style="width: 5%;">
                </td>--%>
                <td style="width: 5%;">
                    联系人：
                </td>
                <td style="width: 15%;">
                    <asp:Label ID="contactPersonLbl" runat="server" Text=""></asp:Label>
                </td>
                <%--  <td style="width: 5%;">
                </td>--%>
                <td style="width: 8%;">
                    联系电话：
                </td>
                <td style="width: 15%;">
                    <asp:Label ID="contactPhoneLbl" runat="server" Text=""></asp:Label>
                </td>
                <%-- <td style="width: 5%;">
                </td>--%>
                <td style="width: 8%;">
                    详细地址：
                </td>
                <td style="width: 30%;">
                    <asp:Label ID="stationAddressLabel" runat="server" Text=""></asp:Label>
                </td>
                <%--<td style="width: 5%;">
                </td>--%>
            </tr>
        </table>
    </asp:PlaceHolder>
    <table border="0px" cellpadding="0px" cellspacing="0px" width="100%">
        <tr style="height: 25px;">
            <td colspan="6">
            </td>
        </tr>
        <tr style="height: 25px;" align="left">
            <td colspan="6" style="border-bottom-style: solid; border-bottom-width: 1px;">
                <img src="image/ico_album.gif" alt="" style="float: left" /><b>图片预览区</b>
            </td>
        </tr>
        <tr>
            <td colspan="6">
                <asp:Panel ID="picturePanel" runat="server">
                </asp:Panel>
            </td>
        </tr>
    </table>
    <!--endprint-->
</asp:Content>
